package com.common.common;

import android.app.Application;
import android.content.Context;

import androidx.annotation.NonNull;

public class CommonInjection {
    private static Application sApplication;

    public static void init(@NonNull final Context context) {
        sApplication = (Application) context.getApplicationContext();
    }

    public static Context provideAppContext() {
        if (sApplication != null) {
            return sApplication;
        } else {
            throw new NullPointerException("Common module application is null!");
        }
    }

}
